<template>
  <view class="order-card">
    <!-- 订单头部 -->
    <view class="order-header flex_left_right">
      <view class="order-main-info flex_right">
        <text class="order-title">{{ detail.name }}</text>
      </view>
      <view class="order-main-info flex_left" v-if="show">
        <text class="info-label">总金额：{{ detail.zje }}</text>
      </view>
    </view>

    <view class="info-grid flex_left_right" style="margin-bottom: 20rpx">
      <view class="info-item flex_right">
        <text class="info-label">订单：{{ detail.dds }}</text>
      </view>
      <view class="info-item flex_right" style="text-align: right">
        <text class="info-label">新用户：{{ detail.newZUserCb }}</text>
      </view>
    </view>
    <view class="info-grid flex_left_right" v-if="show">
      <view class="info-item flex_right">
        <text class="info-label">收益：{{ detail.sr }}</text>
      </view>
      <view class="info-item flex_right" style="text-align: right">
        <text class="info-label">退款数：{{ detail.tks }}</text>
      </view>
    </view>
  </view>
</template>

<script setup lang="ts">
  import useUserInfoStore from '@/store/userInfo'
  import { computed, defineProps, ref } from 'vue'
  const props = defineProps<{
    detail: any
  }>()
  const userInfoStore = useUserInfoStore()
  const show = computed(() => userInfoStore.getUserInfo.type == '02' || userInfoStore.getUserInfo.type == '05'|| userInfoStore.getUserInfo.type == '07')
</script>

<style scoped>
  .order-card {
    background-color: #ffffff;
    border-radius: 20rpx;
    padding: 20rpx;
    margin-bottom: 24rpx;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* 角标文本阴影 - 增强可读性 */
  .status-text {
    position: relative;
    z-index: 1;
    text-shadow: 0 1rpx 2rpx rgba(0, 0, 0, 0.1);
  }

  /* 订单头部 */
  .order-header {
    margin-bottom: 20rpx;
    padding-bottom: 20rpx;
    border-bottom: 1rpx solid #f2f3f5;
  }

  .order-title {
    font-size: 30rpx;
    font-weight: 600;
    color: #1d2129;
  }

  .info-label {
    font-size: 28rpx;
    color: #86909c;
    line-height: 1.2;
  }
</style>
